#include <iostream>
#include <vector>
#include <unordered_set>

using namespace std;

class Solution {
public:
    bool isValidSudoku(vector<vector<char>>& board) {
        bool ret = true;
        vector<unordered_set<char>> hangVt(9);
        vector<unordered_set<char>> lieVt(9);
        vector<unordered_set<char>> kuaiVt(9);
        for (int idx = 0; idx < board.size(); idx++) {
            for (int loop = 0; loop < board[idx].size(); loop++) {
                if (board[idx][loop] == '.') {
                    continue;
                }
                bool hangFlag = isValidData(board[idx][loop], hangVt[idx]);
                bool lieFlag = isValidData(board[idx][loop], lieVt[loop]);
                bool kuaiFlag = isValidData(board[idx][loop], kuaiVt[idx / 3 * 3 + loop / 3]);
                //cout  << board[idx][loop] << boolalpha << "*1 " << hangFlag << " 2 " << lieFlag << " 3 " << kuaiFlag << endl;
                ret = hangFlag && lieFlag && kuaiFlag;
                if (!ret) {
                    return ret;
                }
            }
        }
        return ret;
    }

    bool isValidData(char ch, unordered_set<char>& dataSet)
    {
        if (dataSet.count(ch) == 1) {
            return false;
        }
        dataSet.insert(ch);
        return true;
    }
};

int main()
{
    cout << "aaa" << endl;
    return 0;
}